import { Column, Entity, PrimaryColumn, PrimaryGeneratedColumn, OneToMany, ManyToOne, JoinColumn, CreateDateColumn } from "typeorm";
import { ApiProperty } from '@nestjs/swagger';

@Entity('kz_site_history', {
    comment: '快站更新历史记录表表',
  })
export class KzHistoryEntity {
    @PrimaryGeneratedColumn()
    id: number;

    @Column({ type: 'varchar', name: 'site_id', length: 50, comment: '站点ID' })
    public siteId: string;

    @Column({ type: 'text', name: 'before_content', comment: '更新之前的内容' })
    public beforeContent: string;

    @Column({ type: 'text', name: 'update_content', comment: '更新内容' })
    public updateContent: string;

    @Column({ type: 'char', name: 'update_type', length: 1, default: '1', comment: '更新类型:1(域名),2(内容),3(名称)' })
    public updateType: string;

    @ApiProperty({ type: String, description: '创建者' })
    @Column({ type: 'varchar', name: 'create_by', length: 64, default: '', comment: '创建者' })
    public createBy: string;

    @ApiProperty({ type: Date, description: '创建时间' })
    @CreateDateColumn({ type: 'datetime', name: 'create_time', default: null, comment: '创建时间' })
    public createTime: Date;
}
